<!DOCTYPE html>
<html lang="zh">
    <head>
        <title>${content.title} - ${category.name}</title>
        <meta name="keywords" content="<#list getKeywords(content.title) as a>${a}<#sep>,</#list>"/>
        <meta name="description" content="${content.description}"/>
        <@_includePlace path="/8ddab9ba-a8aa-4745-86c6-66bf1c2c976c.html"/> <#-- header -->
        <link href="${site.sitePath!}assets/gallery/style.css" rel="stylesheet"/>
    </head>
    <body>
        <@_includePlace path="/c32a4f4a-ff5d-49cf-bb59-5d9784539174.html"/> <#-- 导航 -->
        <div class="banner-l3 position-relative d-flex align-items-center justify-content-center" style="background:#22407c url(${site.sitePath}assets/img/banner-l3-bg-1.png) 50% 50% no-repeat;">
            <div class="container text-center position-relative py-3 py-md-4 text-white">
                <div class="breadcrumbs fs-7 text-white d-inline-flex align-items-center text-opacity-50">
                    <@include path="/ftl/bread.ftl"/><#-- 面包屑导航 -->
                </div>
                <h1 class="my-4"><a href="${url!}" class="text-white">${content.title}</a></h1>
                <footer class="fs-8 text-white text-opacity-50 d-flex align-items-center justify-content-center">
                    <span class="me-4 d-inline-flex align-items-center"><img src="${site.sitePath}assets/img/icon-calendar.svg">${content.publishDate?date}</span>
                    <span class="me-4 d-inline-flex align-items-center"><img src="${site.sitePath}assets/img/icon-view.svg"><span id="clicks">loading</span></span>
                    <a href="#comments"><span class="me-4 d-inline-flex align-items-center text-white"><img src="${site.sitePath}assets/img/icon-comment.svg">${content.comments!}</span></a>
                </footer>
            </div>
        </div>
        <div class="container">
            <article class="my-5">
                <div id="content">
                    <div class="mod-gallery">
                        <header class="gallery-title">
                            <h2><a href="${url!}">${content.title}</a></h2>
                            <span class="gallery-counter">
                                <i class="gallery-counter-now" data-gallery="counter-now">?</i>/<i class="gallery-counter-total" data-gallery="counter-total">?</i>
                            </span>
                            <span class="gallery-info"><#if content.copied>来源：${(attribute.source)!} ${(attribute.sourceUrl)!}</#if> ${content.author!} ${content.editor!}</span>
                        </header>
                        <div class="gallery-description">
                            <p>
                                ${content.description!}
                            </p>
                        </div>
                        <div class="gallery-content" data-gallery="content">
                            <div class="gallery-toolbar">
                                <span style="float: right;">
                                    <a data-gallery="view-origin" class="gallery-view-origin" href="javascript:void(0);" hideFocus="true" target="_blank">查看原图</a>
                                    <a data-gallery="view-list" class="gallery-view-list" href="javascript:void(0);" hideFocus="true">全部图片</a>
                                </span>
                                <span style="float: left;">
                                    <a data-gallery="auto-play" class="gallery-auto-play" href="javascript:void(0);" hideFocus="true">幻灯播放</a>
                                    <a data-gallery="auto-stop" class="gallery-auto-stop" href="javascript:void(0);" hideFocus="true">停止播放</a>
                                </span>
                            </div>
                            <div class="gallery-photo">
                                <div class="gallery-photo-items" data-gallery="photo-items">
                            <@_contentFileList contentId=content.id image=true pageSize=5>
                                <#list page.list as a>
                                    <img src="${a.filePath}" alt="${content.title}"/>
                                </#list>
                            </@_contentFileList>
                                </div>
                                <div class="gallery-photo-prev" data-gallery="photo-prev">
                                    <a title="点击浏览上一张图片，支持'←'翻页" href="javascript:void(0);" hideFocus="true">上一页</a>
                                </div>
                                <div class="gallery-photo-next" data-gallery="photo-next">
                                    <a title="点击浏览下一张图片，支持'→'翻页" href="javascript:void(0);" hideFocus="true">下一页</a>
                                </div>
                                <div class="gallery-loading" data-gallery="loading"><img src="${site.sitePath!}assets/gallery/images/loading.gif" /></div>
                                <div class="gallery-end" data-gallery="end">
                            <@_contentList modelId=content.modelId startPublishDate=content.publishDate orderType='asc' pageIndex=1 count=1>
                                <#list page.list as a>
                                    <a href="${a.url!}">
                                        <@_contentFileList contentId=a.id image=true count=1>
                                            <#list page.list as i>
                                                <img src="<@_thumb path=i.filePath width=100 height=75/>" style="margin-top:20px;" alt="${a.title!}"/>
                                            </#list>
                                        </@_contentFileList>
                                        <span>下一图集 &gt;</span>
                                    </a>
                                <#else>
                                    <a href="${site.sitePath}">
                                        <span>没有更多图集了，返回首页看看吧！</span>
                                    </a>
                                </#list>
                            </@_contentList>
                                </div>
                            </div>
                            <div class="gallery-photo-description">
                                <p data-gallery="photo-description">
                                </p>
                            </div>
                            <div class="gallery-footer">
                                <div class="clearfix">
                        <@_contentList modelId=content.modelId endPublishDate=content.publishDate orderField='publishDate' pageIndex=2 count=1>
                            <#if 2=page.pageIndex>
                                <#list page.list as a>
                                    <span class="gallery-prev">
                                        <a href="${a.url!}">
                                            <@_contentFileList contentId=a.id image=true count=1>
                                                <#list page.list as i>
                                                    <img src="<@_thumb path=i.filePath width=100 height=75/>" alt="${a.title}"/>
                                                </#list>
                                            </@_contentFileList>
                                            <span>&lt; 上一图集</span>
                                        </a>
                                    </span>
                                </#list>
                            </#if>
                        </@_contentList>
                        <@_contentList modelId=content.modelId startPublishDate=content.publishDate orderField='publishDate' orderType='asc' pageIndex=1 count=1>
                            <#list page.list as a>
                                    <span class="gallery-next">
                                        <a href="${a.url!}">
                                            <@_contentFileList contentId=a.id image=true count=1>
                                                <#list page.list as i>
                                                    <img src="<@_thumb path=i.filePath width=100 height=75/>" alt="${a.title}"/>
                                                </#list>
                                            </@_contentFileList>
                                            <span>下一图集 &gt;</span>
                                        </a>
                                    </span>
                                </#list>
                            </@_contentList>
                                    <div class="gallery-thumb" data-gallery="slider">
                                        <span class="gallery-thumb-prev">
                                            <a href="javascript:void(0);" hideFocus="true" data-slider="items-left"></a>
                                        </span>
                                        <span class="gallery-thumb-next">
                                            <a href="javascript:void(0);" hideFocus="true" data-slider="items-right"></a>
                                        </span>
                                        <div class="gallery-thumbs" data-slider="control">
                                            <div class="gallery-thumb-list">
                                                <ul class="gallery-thumb-items" data-slider="items">
                                                </ul>
                                            </div>
                                            <div class="gallery-thumb-bar mod-bar" data-slider="bar">
                                                <span class="bar-left"></span>
                                                <span class="bar-right"></span>
                                                <div class="bar-body">
                                                    <div class="bar-content">
                                                        <a class="bar-btn" href="javascript:void(0);" hideFocus="true" data-slider="btn">
                                                            <b class="bar-btn-left"></b>
                                                            <b class="bar-btn-right"></b>
                                                            <span class="bar-btn-body">
                                                                <span>
                                                                    <b class="bar-btn-content"></b>
                                                                </span>
                                                            </span>
                                                        </a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="gallery-photolist" data-gallery="photolist">
                                <ul class="clearfix gallery-photolist-items" data-photolist="items">
                                </ul>
                                <div class="gallery-photo-page mod-page" data-photolist="pager">
                                    <span class="page-prev" data-pager="prev"><a href="javascript:void(0);" hideFocus="true">上一页</a></span>
                                    <ul class="page-items" data-pager="items">
                                    </ul>
                                    <span class="page-next" data-pager="next"><a href="javascript:void(0);" hideFocus="true">下一页</a></span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </article>
            <@include path="/ftl/comment.ftl"/><#-- 评论 -->
        </div>
        <script>
            var itemString="itemType=content&itemId=${content.id}";
        </script>
        <@_includePlace path="/7f8bacb5-30ca-4641-b66f-987d447b1a85.html"/> <#-- footer -->
        <script src="${site.sitePath!}assets/gallery/gallery.js"></script>
        <script>
        $(function(){
            var gallery = new Gallery({
                element: '#content .mod-gallery',
                photos: [
        <@_contentFileList contentId=content.id image=true>
        <#list page.list as a>
                    {
                        big: '${a.filePath}',
                        small: '<@_thumb path=a.filePath width=100 height=75/>',
                        thumb: '<@_thumb path=a.filePath width=100 height=75/>',
                        note: '${((a.description!content.description!)?js_string)!}'
                    }<#if a?has_next>,</#if>
        </#list>
        </@_contentFileList>
                ],
                preload: 3,
                minHeight: 100,
                scrollIntoView: false,
                templatePhotoBig: '',
                templatePhotoSmall: '',
                templatePhotoThumb: ''
            });
        });
        $.getJSON('${site.dynamicPath!}api/contentClick?id=${content.id}', function(data){
            $('#clicks').text(data.clicks);
        });
        </script>
    </body>
</html>